﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Young3.FMSearch.Core.Entities.GameVersions;
using Young3.FMSearch.Core.Managers;
using Young3.FMSearch.Core.Offsets;
using Young3.FMSearch.Core.Attributes;

namespace Young3.FMSearch.Core.Entities.InGame
{
   // [FMType(UseCache=false)]
   public class City : BaseObject
    {
        public City(int memoryAddress, IVersion version)
            : base(memoryAddress, version)
        { }
        public City(int memoryAddress, ArraySegment<byte> originalBytes, IVersion version)
            : base(memoryAddress, originalBytes, version)
        { }

        [FMEntityAttribute(CityOffsets.Name)]
        public string Name { get; private set; }

        [FMEntity(CityOffsets.Attraction)]
        public SByte Attraction { get; set; }

        [FMPointer(CityOffsets.Country)]
        public Country Country { get; set; }

        public override string ToString()
        {
            return Name + " (" + Country.Name + ")";
        }
    }
}
